from .base import *

ALLOWED_HOSTS = ['127.0.0.1', '']

LDAP_AUTH_CONNECTION_USERNAME = 'admin'
LDAP_AUTH_CONNECTION_PASSWORD = 'admin_passwd_4_ldap'

LDAP_AUTH_URL = 'ldap://127.0.0.1:389'

## 钉钉群的 WEB_HOOK， 用于发送钉钉消息
DINGTALK_WEB_HOOK = "https://oapi.dingtalk.com/robot/send?access_token=3a60e3839feb5a53c0a54d32d2e5861fc7f41903a6412e2b0080cb3751dd63e9"
DINGTALK_SECRET = 'SEC113d58d62f72b5958ddaa25b8c76e3c181b316720afaf53fc94f1b906b95faac'

# DINGTALK_WEB_HOOK = "https://oapi.dingtalk.com/robot/send?access_token=3e35978b06a67d8246807e28507bc8ae198c7be12f605da42a6c09e0a47065bd"
# DINGTALK_SECRET = 'SECad20059546e5e8dec9520d938fb95a083407d127b607e0c4368c1085ed076829'

DEBUG =True

INSTALLED_APPS += (
# other apps for production site
    'debug_toolbar',
)

# 群聊id
CHATID = 'chat51b9258f58adf9bf1ef1fe4223b63a57'

# 钉钉应用密钥
APPKEY = 'dingcf30bzefpgrssqth'
APPSECRET = 'AUL9EK9zud74RH-gbC4wSMPa67srYQ1NFIePT5cLPRFF4H3QQ0Hi5E3qBcfLTaKG'

CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/1'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CELERY_TIME_ZONE = 'Asia/Shanghai'
CELERY_MAX_TASKS_PER_CHILD = 10
CELERY_LOG_FILE = os.path.join(BASE_DIR, 'logs', 'celery_work.log')
CELERYBEAT_LOG_FILE = os.path.join(BASE_DIR, 'logs', 'celery_beat.log')

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

sentry_sdk.init(
    dsn="http://e8d16337ee034d48a0d0192d5bbe1f75@127.0.0.1:9000/2",
    integrations=[DjangoIntegration()],
    # 采样率 生产环境访问量过大时建议调小(不要没一个URL都记录性能)
    traces_sample_rate=1.0,
    # If you wish to associate users to errors (assuming you are using
    # django.contrib.auth) you may enable sending PII data.
    send_default_pii=True
)

# DEFAULT_FILE_STORAGE = 'django_oss_storage.backends.OssMediaStorage'
#
# # AliCloud access key ID
# OSS_ACCESS_KEY_ID = os.environ.get('OSS_ACCESS_KEY_ID','')
# # AliCloud access key secret
# OSS_ACCESS_KEY_SECRET = os.environ.get('OSS_ACCESS_KEY_SECRET','')
# # The name of the bucket to store files in
# OSS_BUCKET_NAME = 'djangorecruit'
#
# # The URL of AliCloud OSS endpoint
# # Refer https://www.alibabacloud.com/help/zh/doc-detail/31837.htm for OSS Region & Endpoint
# OSS_ENDPOINT = 'oss-cn-beijing.aliyuncs.com'

